If more then one interface get up/down at once mwan3 could be in a
undefined state, because more then one mwan3 hotplug script are running
and editing the iptables.
Lock the critical section should solve this issue.
Signed-off-by: Florian Eckert <[email protected]>
[ -n "$gateway" ] || exit 9
fi
+mwan3_lock
$LOG notice "$ACTION interface $INTERFACE (${DEVICE:-unknown})"
case "$ACTION" in
;;
esac
+mwan3_unlock
+
exit 0
LOG="logger -t mwan3 -p"
CONNTRACK_FILE="/proc/net/nf_conntrack"
+mwan3_lock() {
+ lock /var/run/mwan3.lock
+}
+
+mwan3_unlock() {
+ lock -u /var/run/mwan3.lock
+}
+
mwan3_get_iface_id()
{
local _tmp _iface _iface_count